<?php

use Illuminate\Support\Facades\Route;
/*
|--------------------------------------------------------------------------
| Admin Routes
|--------------------------------------------------------------------------
|
 */
/**
 * 登录模块
 */
//登录
Route::post('login', 'LoginController@login');
//登出
// Route::middleware('auth:sanctum')->get('logout', 'LoginController@logout');

//验证码
Route::get('captcha', 'LoginController@captcha');
Route::post('upload', 'UploadController@upload');
Route::group(['namespace' => 'Auth'], function () {
    
    //管理员
    Route::resource('user', 'AdminUserController', ['only' => ['index', 'show', 'store']]);
    Route::post('user/save', 'AdminUserController@update');
    Route::post('user/password', 'AdminUserController@updatePassword');

    //角色
    Route::resource('role', 'AdminRoleController', ['only' => ['index', 'show', 'store']]);
    //菜单
    Route::resource('menu', 'AdminMenuController', ['only' => ['index', 'show', 'store']]);
    Route::get('roleMenu', 'AdminMenuController@roleMenu');
});

// 政务消息
Route::resource('government', 'GovernmentInfoController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 系统key
Route::resource('system/module', 'SystemModuleInfoController', ['only' => ['index', 'show', 'store', 'update']]);
// 文化之声
Route::resource('culture/voice', 'CultureVoiceController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 精彩直播
Route::resource('live', 'LiveController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 点播
Route::resource('video', 'VideoController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 资讯
Route::resource('news', 'NewsController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 非遗
Route::resource('cultural/heritage', 'CulturalHeritageController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
Route::resource('heritage/type', 'CulturalHeritageTypeController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);

// 场馆
Route::resource('venue', 'VenueController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 场馆预约日期
Route::resource('meetday', 'MeetDayController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
Route::resource('meethour', 'MeetHourController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 活动
Route::resource('activity', 'ActivityController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
Route::post('activity/status', 'ActivityController@setStatus');
Route::get('activity-name', 'ActivityController@getActivityName');
// 活动申请
Route::get('activity-form', 'ActivityFormController@index');
Route::post('activity-form/auditStatus', 'ActivityFormController@setAuditStatus');

// 志愿活动
Route::resource('volunteer/activity', 'VolunteerActivityController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
// 分馆
Route::resource('branch', 'BranchController', ['only' => ['index', 'store', 'update', 'destroy']]);
// 分馆资讯
Route::resource('branch/info', 'BranchInfoController', ['only' => ['index', 'show', 'store', 'update', 'destroy']]);
